package com.xxq.dao;

import com.xxq.entity.Regist;

import my.db.QueryHelper;

public class RegistDao {

	/**
	 * 增加
	 * */
	public void save(Regist regist) {
		String sql = "insert into reg1 values(null,?,?,?,?,?,?)";
		QueryHelper.update(sql, regist.getUsername(), regist.getUserPassword(), regist.getUsesrRePassword(), regist.getUserPhone(),regist.getUserEmail(),regist.getUserGender());
	}

	/**
	 * 根据ID查询
	 * */
//	public Regist findById(char[] username) {
//		String sql = "select * from student where username=?";
//		return  QueryHelper.queryUnique(Regist.class, sql, username);
//	}
	public static void main(String[] args) {
		Regist r=new Regist();
		RegistDao dao=new RegistDao();
		dao.save(r);
				
		
	}
	
}
